#ifndef __PHYSICS_SPRITE_H__
#define __PHYSICS_SPRITE_H__

#include "GlobalDef.h"

class PhysicsSprite : public CCSprite {
public:
	PhysicsSprite();
	~PhysicsSprite();
	bool initWithPhysics(const char* fileName,  const CCRect& rect, b2Body *body = NULL);
	static PhysicsSprite* createWithPhysics(const char* fileName,  const CCRect& rect, b2Body *body = NULL);
	
public:
	void updatePosition(float dt);

public:
	void setPhysics(b2Body *body);
	b2Body* getPhysics() const;
private:
	b2Body* m_body;
};

#endif // __PHYSICS_SPRITE_H__